<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset='utf-8'>
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>我的课程表</title>
    <link rel="stylesheet" type="text/css" href="/common/jquery-easyui-1.5.5.7/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="/common/jquery-easyui-1.5.5.7/themes/icon.css">
</head>
<body>
<c:forEach var="item" items="${jsList}">
    <div style="margin-bottom: 5px;">
        <div id="${item.id}" class="easyui-panel" title="${item.kczlsname} 状态:${item.wcjgsname}" style="width:100%;height:180px;padding:5px;background:#fafafa;">
            <p>上课时间:${item.sksjFmt_} - ${item.xksjFmt_}</p>
            <p>课程单元:${item.idkcdysname}</p>
            <c:if test="${item.wcjgsname!='取消上课'}">
                <button class="easyui-linkbutton" style="float:right;" data-options="iconCls:'icon-search'" onclick="erweima('${item.id}')">扫码确认</button>
            </c:if>

        </div>
    </div>

</c:forEach>
<div id="win" class="easyui-window" title="课程扫码" fit="true" data-options="modal:true,collapsible:false,minimizable:false,maximizable:false">
    <center>
        <div id="ewm" style="width: 500px;height: 500px;margin-top: 20px;"></div>
    </center>

</div>

<script type="text/javascript" src="/common/jquery-easyui-1.5.5.7/jquery.min.js"></script>
<script type="text/javascript" src="/common/jquery-easyui-1.5.5.7/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/common/jquery.qrcode.min.js"></script>
<script>
    $(function(){
        $('#win').window('close');
    });
function erweima(id){
    var url="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8b259a4c22f705f8&redirect_uri=http://www.imeliteonline.com/dk/courseAction/getDk_page.do?jsid="+id+"&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect";
    $('#ewm').html("");
    jQuery('#ewm').qrcode(url);
    $('#win').window('open');
}
</script>
</body>
</html>
